<div class="row">
    <div class="col-xs-6 col-sm-3">
        <?php echo ws_load_content('contents/account_sidebar'); ?>
    </div>
    <div class="col-xs-6 col-sm-9">
        <div class="page-header">
            <h4>修改头像
                <small>您需要自己上传一张新照片来作为自己的个人头像</small>
            </h4>
        </div>
        <div class="">

            <?php if ($error) { ?>
                <div class="alert alert-danger">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p><?php echo $error; ?></p>
                </div>
            <?php } ?>

            <?php if ($this->session->flashdata('SUCCESS')) { ?>
                <div class="alert alert-success">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p><?php echo $this->session->flashdata('SUCCESS'); ?></p>
                </div>
            <?php } ?>

            <div class="row">
                <div class="col-sm-4">
                    <img class="thumbnail" src="<?php echo $this->user->get_Avatar(170, 150); ?>"
                         alt="个人头像"/>
                </div>
                <div class="col-sm-8">
                    <?php echo form_open_multipart(); ?>
                    <div class="form-group">
                        <label for="user_profile_pic">上传头像</label>
                        <input name="user_profile_pic" id="user_profile_pic" class="form-control input-sm" type="file"/>

                        <p class="help-block">图片尺寸为
                            : <?php echo $min_size; ?>x<?php echo $min_size; ?></p>
                    </div>
                    <button type="submit" name="upload_img" class="btn btn-info btn-sm"><i
                            class="fa fa-upload"></i> 上传</button>
                    <?php echo form_close(); ?>
                </div>
            </div>
        </div>
    </div>
</div>